世新大學九十二學年度研究所博碩士班考試

                                              

學系別

考試科目

平面傳播科技學系

電子計算機概論

 

1.      (10 points)

     Please write the output of the following codes.

 

     int m, n;

     n = 10;

     while (--n < 0)

     {

         m = n;

         do

             cout <<”$*$”; while (m-- < 0); cout << endl;

      }

 

2.      (15 points)

  Consider the following code segment.     

 

     double a[6] = {-7.8, 8.8, 12.5, 16.3, 20.2, -9.7};

     double *pa = &a[0] + 1; **ppa = &pa;

     intj = 2

 

     Assume that the contents of variables pa and ppa are 300 and 800, respectively. What are the values of the following expressions?

 

(1)   pa + j  (2) *pa + j  (3) *ppa  (4) *ppa +1  (5)*(*ppa + 1)

      

3.      (15 points)

     Imagine that we have the following declarations:

 

     double salary[10];

     double *pr = salary + 6;

 

     Assume that each double variable has length eight bytes. Show how you can access all ten elements of the array salary using the pointer pr.

 

4.      (20 points)

     Please answer the following questions about the Internet today.

(1)   What is an URL (Union Resource Locator)? Explain the four parts of it. (5 points)

(2)   Name and explain two parts of an IP address. (6 points)

(3)   Define the Class A, Class B, and Class C IP-address, respectively. (9 points)

 

5.      (15 points)

(1)   Explain average seek time, rotational delay time, and transfer time of a hard disk,

   respectively. (9 points)

(2)   John has bought a hard disk with the following specification.

(a)    It rotates at 9,600 RPM (Rotations Per Minute).

(b)   The advertised average seek time is 6 ms and the transfer rate is 20 MB/sec. What is the average time to read or write a 2MB-sector from John’s hard disk? (6 points)

 

6.      (10 points )

     Assume that a computer uses 24 bits to represent each integer. All negative integers are represented by 2’s complement. Answer the following questions under this representation. Each question is with 5 points.

(1)   Perform (215)10 – (8192)10. You must transform the numbers into binary numbers and use the 2’s complement to achieve the calculation.

(2)   What are the largest and the smallest integers?

 

7.      (15 points)

     Please explain the following terms.

(1)   CPU (Central Processing Unit)

(2)   LAN (Local Area Network) v.s. WAN (Wide Area Network)

(3)   RAM (Random Access Memory) v.s. ROM (Read Only Memory)

(4)   digital signals v.s. analog signals

(5)   machine cycle